package com.liufei1988.design.openAndClosing;

import javax.management.Notification;

public class TpsAlertHandler extends AlertHandler {


    public TpsAlertHandler(AlertRule rule, Notification notification) {
        super(rule, notification);
    }

    @Override
    public void check(ApiStatInfo apiStatInfo) {
        long tps=apiStatInfo.getRequestCount()/apiStatInfo.getDurationOfSeconds();
        if (tps>rule.getMachedRule(apiStatInfo.getApi())) {
            ;
        }
    }
}
